import request from '@/utils/request'

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}

export const getCaptcha = (key) => request({ url: '/captcha', params: { key }, responseType: 'blob' })
export const login = (data) => request.post('/login', data)
export const getProfile = () => request('/menus')
